package module.library.service;

import common.model.Entity.libraryEntity.Reserve;
import common.model.Entity.libraryEntity.enums.ReserveStatus;
import network.protocol.Response;

import java.util.List;

public interface ReserveService {

    /**
     * 用户预约图书
     * @param bookId
     * @param userId
     * @return
     */
    Response<Long> reserveBook(Long bookId,Long userId);

    /**
     * 取消图书预定
     *
     * @param reservationId
     * @return
     */
    Response<?> cancelReservation(Long reservationId);

    /**
     * 取书完成
     * @param reservationId
     * @return
     */
    Response<?> completePickup(Long reservationId);

    /**
     * 获取用户当前的有效预约
     *
     * @param userId
     * @return
     */
    Response<List<Reserve>> getActivateReservations(Long userId);

    /**
     * 获取某本书当前的等待队列
     * @param isbn
     * @return
     */
    Response<List<Reserve>> getWaitingQueue(String isbn);
}